import request from "../../utils/request.js";

/**
 * 故障自愈配置
 * @param {*} data
 * @returns
 */
export const addAction_Api = (data) =>
  request.post("/intelligent/action/add", data);

/**
 * 故障自愈批量删除
 * @param {*} query
 * @returns
 */
export const delAction_Api = (data) => {
  return request({
    method: "delete", //请求方式
    url: "/intelligent/action/ids?params=" + data,
  });
};

/**
 * 故障自愈状态修改
 * @param {*} query
 * @returns
 */
export const editAction_Api = (query) => {
  return request({
    method: "put", //请求方式
    url: "/intelligent/action/update",
    params: query, //请求地址
  });
};
/**
 * 获取故障自愈列表列表
 * @param {*}
 * @returns
 */
export const getActionList_Api = (query) =>
  request.get("/intelligent/action/list", { params: query });

/**
 * 获取脚本列表
 * @param {*}
 * @returns
 */
export const getScript_Api = () => request.get("/intelligent/scripts");
